exercises

Exercises#

Note: you can use online editor to work on the following exercises. Repl.it for example.

Exercise 1#

Write a JavaScript function that takes an integer as an input and returns if that integer is even or odd.

Exercise 2#

Write a JavaScript function to convert temperatures from Fahrenheit to Celsius.

Formula: c = (f - 32) * (5 / 9)

Exercise 3#

Write a JavaScript function to compute the product of all integers from 1 to a given positive integer.

Note: In mathematics, this is called the factorial of a number and it's denoted by n! where n is a positive integer.

// Expected Outcomes:
function findProduct(int) {
// some code
}
findProduct(3); // Returns: 6 = 1 * 2 * 3
findProduct(4); // Returns: 24
findProduct(5); // Return: 120

Exercise 4 :#

solve the question in this link Note: don't forget to change the language to javascript before you start.